home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / off_09.zip / WRITER.TXT < prev   
Text File  |  1993-01-12  |  26KB  |  568 lines

  1.  -----------------------------------------------------------------------------
  2.   __    ___  ___
  3.  /  \  |__  |__
  4.  \__/  |    |
  5.  
  6.  
  7.  An Informal Documentation Formatter
  8.  
  9.  -----------------------------------------------------------------------------
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                     WRITER'S GUIDE
  18.  
  19.                                Vassilis V. Dimakopoulos
  20.  
  21.  
  22.                          --- Last Revision: January 1993 ---
  23.  
  24.  
  25.  
  26.  
  27.                                    QUICK OVERVIEW
  28.   
  29.   
  30.  
  31.           OFF will do certain things for your documents, like
  32.  
  33.           ■   format your paragraphs
  34.           ■   center lines
  35.           ■   put attributes on the screen (e.g. bold, reverse, etc.)
  36.           ■   create lists of things
  37.  
  38.           Just write your document in any text editor without worrying for
  39.           the visual beauty of it.  You  only  have  to  put  some  simple
  40.           keywords in some places that OFF will understand later to format
  41.           your document. When finished just run OFF on your file and watch
  42.           the result.
  43.  
  44.           Consult the OFF Reader's Guide for OFF' s options.
  45.  
  46.  
  47.  
  48.  
  49.                                       STARTING
  50.   
  51.   
  52.  
  53.           Your document consists of paragraphs and commands. The  commands
  54.           affect the appearance of paragraphs. A paragraph  is  a  set  of
  55.           contiguous lines that ends with a blank line. This means that  a
  56.           blank line starts a new paragraph. The job of OFF  is  basically
  57.           to format the paragraphs by adding/deleting spaces so  that  all
  58.           lines in a paragraph are both right and  left  indented  by  the
  59.           same amount. An example follows:
  60.  
  61.      Document                                                        OFF output
  62.   
  63.      As I was walking down                       As I was walking down the road
  64.      the     road   next                         next to my  house  I  heard  a
  65.      to                                          voice:
  66.      my house I heard a voice:
  67.                                                  "You started a  new  paragraph
  68.      "You started a new                          you stupid!"
  69.      paragraph you stupid!"
  70.  
  71.           All the commands that OFF understands have the '%' character  in
  72.           front of them, e.g. '%center', '%macro'. Then the  command  name
  73.           follows, without any space between the '%' and the command name.
  74.           A space before or after a command is optional.
  75.  
  76.           If you want to actually print the character '%', precede it with
  77.           a backslash (\). If want to print the backslash, precede it with
  78.           another backslash (or else it will be ignored):
  79.  
  80.      Document                                                        OFF output
  81.   
  82.      Some characters: \%, \\, \\\%                    Some characters: %, \, \%
  83.  
  84.           In most of the cases you won't need to use (m)any commands.  For
  85.           example if you are writing a letter to  somebody  then  probably
  86.           you just want OFF to format your paragraphs (instead of doing it
  87.           by hand!) and nothing else.
  88.  
  89.           In case you want to do fancy things  (e.g.  center  some  lines)
  90.           then you probably need to know some of the commands OFF  offers.
  91.           Tutorial sections for the commands follow and the complete  list
  92.           is given for reference at the end of this document.
  93.  
  94.  
  95.  
  96.  
  97.                                      ATTRIBUTES
  98.   
  99.   
  100.  
  101.           OFF has 4 commands  to  control  the  appearance  of  text  when
  102.           displayed or printed:
  103.  
  104.                             %bold, %norm, %rev, %under.
  105.  
  106.           %bold makes text appear in bold style; %rev  makes  text  appear
  107.           reversed (black characters on white background or  vice  versa);
  108.           %under produces underlined  text;  %norm  resets  everything  to
  109.           normal.
  110.  
  111.           NOTE: When OFF output is sent directly to a printer ( -p command
  112.           line  option,)  then  reversed  characters  actually  appear  as
  113.           italics.
  114.  
  115.      Document                                                        OFF output
  116.   
  117.      Different attributes:                              Different attributes:
  118.  
  119.      %bold bold %rev reverse %under                     bold reverse underlined
  120.      underlined 
  121.  
  122.  
  123.  
  124.  
  125.                                LINE CONTROL COMMANDS
  126.   
  127.   
  128.  
  129.           You can tell OFF to treat a line of text in a special way, using
  130.           the commands:
  131.  
  132.                            %center, %right, %trio, %verb.
  133.  
  134.           %center will center a line; %right will flush a line towards the
  135.           right end of the screen; %trio will produce a line consisting of
  136.           3 parts: a flushed-left, a centered and  a  flushed-right  part;
  137.           %verb will produce a line preserving all the  spaces  you  typed
  138.           (i.e. verbatim line, unlike lines inside paragraphs.)
  139.  
  140.           When OFF meets any of the above commands in your document,  then
  141.           it will read the rest of the line and process it accordingly.
  142.  
  143.      Document                                                        OFF output
  144.   
  145.      Look at the following three lines,      Look at the following three  lines
  146.      that illustrate \%center,               that illustrate  %center,  %right,
  147.      \%right, \%trio and \%verb.             %trio and %verb.
  148.  
  149.      %center Centered                                     Centered
  150.      %right  Flushed right                                        Flushed right
  151.      %trio L %center C %right R              L               C                R
  152.      %verb Lots       of  spaces    !        Lots       of  spaces    !
  153.  
  154.           As you can see in the last example, a %trio line should be typed
  155.           as
  156.  
  157.             %trio <left text> %center <center text> %right <right text>
  158.  
  159.           to create the 3-part line. You can omit any of the  3  parts  if
  160.           you wish. For example,
  161.                        %trio <left text> %right <right text>
  162.           will produce a line with a left and a right part only.
  163.  
  164.           Some things should be noted about the %verb command:
  165.           (a) it outputs spaces exactly as they appear in  your  document,
  166.           even if these spaces are preceded by a command. For example,
  167.                                   %verb a %bold b
  168.           will produce
  169.           --> a  b
  170.           while,
  171.                                    %verb a%boldb
  172.           will produce
  173.           --> ab
  174.           So watch your spaces!
  175.           (b) keep in mind that the 1st  space  appearing  after  a  %verb
  176.           command is always ignored.
  177.           (c) no indentation exists for verbatim lines, i.e. output begins
  178.           at column 0 always.
  179.  
  180.           Inside a line that is to be formatted by the above commands, OFF
  181.           only understands the  %bold,  %endcol,  %newpage,  %norm,  %rev,
  182.           %startcol, %under, %[ and %] commands. The last two commands  do
  183.           not make any sense inside a %verb line, of course.
  184.  
  185.  
  186.           In the case you want to have many lines formatted by  the  above
  187.           commands, instead of typing the command name in the beginning of
  188.           each line, you can use the %begin command, as follows:
  189.  
  190.           %begin <command_name>
  191.           ...
  192.           ... (lines to be processed)
  193.           ...
  194.           %end
  195.  
  196.           Do not forget the %end at the end!
  197.  
  198.      Document                                                        OFF output
  199.   
  200.      Here is a bunch of centered                    Here is a bunch of centered
  201.      lines, using the \%begin center                lines,  using  the   %begin
  202.      command:                                       center command:
  203.      
  204.      %begin center                                           First line
  205.      First line                                           Second line now
  206.      Second line now                                       The last line
  207.      The last line
  208.      %end
  209.  
  210.           You should keep in mind that whatever follows in the line  of  a
  211.           '%begin <c